#ifndef _RAY_H_
#define _RAY_H_

#ifdef _DEBUG
#include "Assert.h"
#endif

#include "../cuCommon/cuTypes.h"
#include "../cuCommon/cuMath.h"

struct SRay
{
    float3 O;
    float3 D;
};

SDH_CALL SRay * Ray(SRay * pRay)
{
    set(pRay->O);
    set(pRay->D);

    return pRay;
}

SDH_CALL SRay * Ray(SRay * pRay, const float3 & point, const float3 & dir)
{
    pRay->O = point;
    pRay->D = normalize(dir);

    return pRay;
}

#endif